package com.suxin.thread.manager.pool;

import java.util.concurrent.*;

/**
 * @author Tang
 * @classname CloseRunnable
 * @description [  ]
 * @date 2022/10/17 15:47
 */
public class CloseRunnable extends AbstractQueueRunnable<LogRecord>{

    public CloseRunnable(Executor executor) {
        super(executor);
    }

    @Override
    protected void runTask() {
        BlockingQueue<LogRecord> blockQueue = getBlockQueue();
        // 处理 队列数据 LogRecord
    }

    @Override
    protected BlockingQueue<LogRecord> getBlockQueue() {
        return new ArrayBlockingQueue<LogRecord>(16);
    }

    public static void main(String[] args) {
        Executor executor = Executors.newSingleThreadExecutor();
        CloseRunnable closeRunnable = new CloseRunnable(executor);
        closeRunnable.add(new LogRecord());
        closeRunnable.execute();
    }

}
